<!--<link rel="stylesheet" type="text/css" href="assets/bootstrap-datepicker/css/datepicker.css" />-->
<script src="js/CertusFileUpload.js"></script>
<!--<script type = "text/javascript" src = "assets/bootstrap-datepicker/js/bootstrap-datepicker.js" ></script>-->
<script src="js/proinfo/purchase/addSupplies-BSD.js"></script>
<!--main content start-->
<section id="main-content">
    <section class="wrapper">
        <!--state overview end-->
        <div class="row">
            <div class="col-lg-12">
                <section class="panel">
                    <header class="panel-heading">
                        添加供应商
                    </header>
                    <div class="panel-body">
                        <div class="bio-row">
                            <p>
                                <span>项目名称</span>{{headerMap.proName}}</p>
                        </div>
                        <div class="bio-row">
                            <p>
                                <span>申请人</span>{{headerMap.applyManname}}</p>
                        </div>
                        <div class="bio-row">
                            <p>
                                <span>申请时间</span>{{headerMap.applyTime}}</p>
                        </div>
                        <div class="bio-row">
                            <p>
                                <span>申请用途</span>{{headerMap.useFul}}</p>
                        </div>
                        <div class="bio-row line-row">
                            <p>申请说明</p>
                            <p>{{headerMap.descriptor}}</p>
                        </div>
                    </div>
                </section>
                <section class="panel">
                    <header class="panel-heading add-heading">
                        采购清单
                        <i class="add-icon icon-eye-open" onclick="showAllQuote();"> 全部报价</i>
                    </header>
                    <div class="panel-body">
                        <div id="proc3Container" class="dlshouwen-grid-container"></div>
                    </div>
                </section>
                <section class="panel hdplog" style="display: none;">
                    <header class="panel-heading">
                        供应商报价历史库
                    </header>
                    <div class="panel-body">
                        <div id="prcLogContainer" class="dlshouwen-grid-container"></div>
                    </div>
                </section>
                <section class="panel hdgs" style="display: none;">
                    <header class="panel-heading">
                        供应商报价
                    </header>
                    <div class="panel-body">
                        <!--<div class="form-group customerForm">-->
                        <!--<label class="col-sm-2 control-label">地点(对应当地财务经理)</label>-->
                        <!--<div class="col-sm-10">-->
                        <!--<select class="form-control">-->
                        <!--<option>请选择</option>-->
                        <!--<option>南京-XXX</option>-->
                        <!--</select>-->
                        <!--</div>-->
                        <!--</div>-->
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">供应商名称</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" certus_an_limit_length="50" ng-model="buyingQuoteItem.supplierName">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">联系方式</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" onblur="telNo(this.id)" id="tellNo1" certus_an_limit_length="50" ng-model="buyingQuoteItem.supplierPhone">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">规格(参数)</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" certus_an_limit_length="50" ng-model="buyingQuoteItem.specification">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">价格(说明)</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" certus_an_limit_length="50" ng-model="buyingQuoteItem.price">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">价格(含税)</label>
                            <div class="col-sm-10">
                                <input type="text" certus_an_limit_length_num="50" class="form-control" ng-model="buyingQuoteItem.priceIncludingTax">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">交货期</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="dateOfDeliveryId">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">质保期</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="guaranteePeriodId">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">付款方式</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" certus_an_limit_length="50" ng-model="buyingQuoteItem.paymentMethod">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">优劣势</label>
                            <div class="col-sm-10">
                                <textarea class="form-control" certus_an_limit_length="50" ng-model="buyingQuoteItem.strengthsAndWeaknesses"></textarea>
                            </div>
                        </div>
                        <p class="default-buttons">
                            <a href="javascript:void(0);" class="button-back btn btn-info" onclick="hdgs();">取消</a>
                            <a href="javascript:void(0);" class="button-next  btn btn-info btn-l10" ng-click="saveQuote()">确认</a>
                        </p>
                    </div>
                </section>

                <section class="panel hdupload" style="display: none;">
                    <header class="panel-heading">
                        附件上传
                    </header>
                    <div ng-include="'templates/upload-file.html'"></div>
                    <p class="default-buttons">
                        <a href="javascript:void(0);" class="button-back btn btn-info" onclick="hidefile()">返回</a>
                        <a href="javascript:void(0);" class="button-next  btn btn-info toRegu" ng-click="uploadBqFile(nowUploadBqcode,nowUploadBicode)">提交</a>
                    </p>
                </section>
                <section class="panel">
                    <header class="panel-heading">
                        供应商报价列表
                    </header>
                    <div class="panel-body">
                        <div id="prcListContainer" class="dlshouwen-grid-container"></div>
                    </div>
                </section>
                <section class="panel">
                    <header class="panel-heading">
                        留言
                    </header>
                    <div class="panel-body">
                        <div class="form-group customerForm">

                            <textarea class="form-control" certus_an_limit_length="200" ng-model="submmitData.purchaseStepEntity.opinionMsg"
                                certus-required></textarea>

                        </div>

                    </div>
                </section>

                <section class="panel">
                    <div class="panel-body">
                        <p class="default-buttons">
                            <a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
                            <a href="javascript:void(0);" class="button-next  btn btn-success" ng-click="submitQuote()">确认提交</a>
                        </p>
                    </div>
                </section>
            </div>
        </div>
    </section>
</section>

<script>
    var picker2 = $('#dateOfDeliveryId').datetimepicker({
        format: 'YYYY-MM-DD',
        locale: moment.locale('zh-cn')
    }).on('dp.change', function (e) {
        var result = new moment(e.date).format('YYYY-MM-DD');
        if (result && !angular.isUndefined(result)) {
            $$scope.buyingQuoteItem.dateOfDelivery = result;
            // console.log(result);
        }
    })

    var picker3 = $('#guaranteePeriodId').datetimepicker({
        format: 'YYYY-MM-DD',
        locale: moment.locale('zh-cn')
    }).on('dp.change', function (e) {
        var result = new moment(e.date).format('YYYY-MM-DD');
        if (result && !angular.isUndefined(result)) {
            $$scope.buyingQuoteItem.guaranteeTime = result;
            // console.log(result);
            // $scope.$apply();
        }
    })
</script>